﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace WpfDemo.Models.Migrations
{
    public partial class addmoduleId : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<string>(
                name: "F_ModuleId",
                table: "SysAuth",
                type: "TEXT",
                nullable: true);

            migrationBuilder.CreateIndex(
                name: "IX_SysAuth_F_ModuleId",
                table: "SysAuth",
                column: "F_ModuleId");

            migrationBuilder.AddForeignKey(
                name: "FK_SysAuth_SysModule_F_ModuleId",
                table: "SysAuth",
                column: "F_ModuleId",
                principalTable: "SysModule",
                principalColumn: "F_Id");
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropForeignKey(
                name: "FK_SysAuth_SysModule_F_ModuleId",
                table: "SysAuth");

            migrationBuilder.DropIndex(
                name: "IX_SysAuth_F_ModuleId",
                table: "SysAuth");

            migrationBuilder.DropColumn(
                name: "F_ModuleId",
                table: "SysAuth");
        }
    }
}
